/**
 * @param {string} s
 * @return {string}
 */
 var sortSentence = function(s) {
    const a = s.split(' ')
    let ans = ''
    a.sort((x,y) => {
        return Number(x[x.length-1]) - (y[y.length-1])
    })
    return a.map(item => item.slice(0,item.length-1)).join(' ')
};